﻿////required: "<script type='text/javascript'>alert('必选字段');</script>",

$(document).ready(function(){
    
    // 分数填写验证       
    jQuery.validator.addMethod("score", function(value, element) {       
        //var tel = /^(2)|([0-1](\.\d)?)$/;   
        var istrue = value >= 0 && value <= 100;
        //var istrue = value >= 0 && value <= 5;
        //if(!istrue){
        //   clearElement(element);          
        //}
        return this.optional(element) || (istrue);       
    }, "请填写0到100之间的数");
 

    $('#mark_form').validate();
    
    function clearElement(element) {
        $(element).val('');
    }
});